package com.qipay.pay;

import com.qipay.pay.entity.SpPayWeiXinNativeCallbackRequest;
import com.qipay.pay.entity.CpPayWeiXinNativeRequest;
import com.qipay.pay.entity.CpPayWeiXinTradeCloseRequest;
import com.qipay.pay.entity.CpPayWeiXinTradeQueryRequest;
import com.qipay.security.jwt.JWTUser;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

public interface WeiXinPayService {

    @Transactional
    Map<String, Object> payWeixinNative(CpPayWeiXinNativeRequest entity,
                                        JWTUser loggedUser) throws Exception;

    @Transactional
    void payWeixinNativeCallback(
            SpPayWeiXinNativeCallbackRequest entity
    ) throws Exception;

    @Transactional
    Map<String, Object> payWeixinTradeQuery(
            CpPayWeiXinTradeQueryRequest entity,
            JWTUser loggedUser) throws Exception;

    @Transactional
    Map<String, Object> payWeixinTradeClose(
            CpPayWeiXinTradeCloseRequest entity,
            JWTUser loggedUser
    ) throws Exception;
}
